from PyQt5.QtWidgets import  QDialog,QHBoxLayout
from PyQt5.QtCore import QUrl,pyqtSignal
#from PyQt5.QtWebChannel import *
#from PyQt5.QtWebEngineWidgets import *
from PyQt5.Qtw

class TMainWindow(QDialog):
    SigSendMessageToJS = pyqtSignal(str)

    def __init__(self,parent=None):
        super().__init__(parent=None)
        self.setWindowTitle("Oscilloscope 0.0.1")

        self.wlayout = QHBoxLayout()
'''
        self.mpJSWebView = QWebEngineView(self)
        self.pWebChannel = QWebChannel(self.mpJSWebView.page())
        self.mpJSWebView.page().setWebChannel(self.pWebChannel)
        self.url = 'file:///html/index.html'
        self.mpJSWebView.page().load(QUrl(self.url))
        self.mpJSWebView.show()
        self.wlayout.addWidget(self.mpJSWebView)
        self.setLayout(self.wlayout)
'''
    def OnReceiveMessageFromJS(self,strParameter):
        print(strParameter)

    def OnSendMessageByInteractObj(self):
        strMessage = "Test"#self.mp
        self.SigSendMessageToJS.emit(strMessage)

    def OnSendMessageByJS(self):
        pass